home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / BBS / GOTHIK15.ZIP / BLUEMOON.ZIP / BLUEMOON.C < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-30  |  20.1 KB  |  564 lines

  1. ///////////////////////////////
  2. // The Blue Moon Tavern v1.0 //
  3. //  Written January 7, 1996  //
  4. //     By  Dan Shaurette     //
  5. // As an IGM for GOTHIK 1.42 //
  6. ///////////////////////////////
  7. //     (C) Copyright 1996    // 
  8. //     AQUARIUS Software     //
  9. ///////////////////////////////
  10. /* 
  11.    This game is written as a demonstration of how to access
  12.    the GOTHIK.PLR file and INPLAY.DAT file to garner information
  13.    about the current player in GOTHIK.  You are free to use parts
  14.    of this code to create new IGMs, but please, do not make changes
  15.    to, or rerelease, the Blue Moon Tavern IGM without my permission.
  16.    Make a whole new tavern, cannibalizing this one if you must,
  17.    but don't make variations to my tavern.  Thank you.
  18.    
  19.    P.S. This was written using Brian Pirie's OpenDoors C Door Library
  20.    functions.  They are not included with this distribution.  You may
  21.    use whatever libraries you are familiar with.  But this is just so you
  22.    know, all of the functions that you see in my code that begin od_,
  23.    those are his communications functions.
  24. */
  25.  
  26. #include "\opendoor\opendoor.h"  /* Include required header file */
  27. #include <stdio.h>
  28. #include <stdlib.h>
  29. #include <string.h>
  30. #include <time.h>
  31.  
  32. #define BUF_SIZE 256
  33. #define VERSION "1.0"
  34.  
  35. FILE *PlayerFile;
  36. int playerNum;
  37. char GothikDir[80], command[80];
  38. char Convo[22][80];
  39. int ConvoCount;
  40.  
  41. struct PlayerData { //// This is the structure found in "GOTHIK.PLR".
  42.    char name[36]; ////// The player's handle/real name from drop file.
  43.    char gameName[26]; // The player's handle inside GOTHIK.
  44.    char sex; /////////// Their sex, 'M' or 'F'.
  45.    char fluff1; //////// Alignment fluff (ignore).
  46.    char lastOn[9]; ///// Date the player played last in "mm-dd-yy" format.
  47.    char fluff2; //////// More alignment fluff.
  48.    char birthdate[9]; // Player's Birthdate in "mm-dd-yy" format.
  49.    char fluff3; //////// Last piece of fluff.
  50.    char attacked[26]; // gameName of who attacked player,"~" if not attacked.
  51.    
  52.    short int  level;      /// Player's level (1 to 13).
  53.    short int  exp;      ///// Player's experience points.
  54.    short int  mortal;      // 0 = Human, 1 = Vampire.
  55.    short int  rating;      // 2 = LEWD, 1 = RUDE, 0 = PRUDE.
  56.    short int  timesOn; ////// Number of times the player played today.
  57.    short int  HP; /////////// Player's Hit Points left.
  58.    short int  maxHP; //////// Maximum amount of HP.
  59.    short int  moves; //////// Moves left to make.
  60.    short int  maxMoves; ///// Maximum amount of moves.
  61.    short int  weapon; /////// Weapon type owned by the player.
  62.    short int  weaponPlus; /// A modifier to the weapon.
  63.    short int  ammo; ///////// Ammunition type owned by the player.
  64.    short int  ammoPlus; ///// A modifier to the ammo.
  65.    short int  ammoAmount; /// Amount of ammunition remaining.
  66.    short int  defense; ////// Type of ward that the player has (if Human).
  67.    short int  defensePlus; // Modifier to the ward.
  68.    
  69.    short int  Str, Int, Wis, Dex, Con, Cha; // D&D style characteristics.
  70.    short int  Willpower, Humanity, Thirst; /// New-style characteristics.
  71.    short int  Faith, Inginuity;
  72.    
  73.    long inBank; ///////////// The amount of cash the player has in the bank.
  74.    long onHand; ///////////// The amount of cash the player has on hand.
  75. };
  76. struct PlayerData Player;
  77.  
  78. void custom_line_function (char *keyword, char *options);
  79. char before_chat_buffer[4004];
  80. char before_chat_saved = FALSE;
  81. void before_chat_function (void);
  82. void after_chat_function (void);
  83.  
  84. ///////////////////////////////////////////////////////////////////////////
  85.  
  86. int RandSeed;
  87.  
  88. void Randomize(void) {
  89. time_t timer;
  90.  
  91.    time(&timer);
  92.    RandSeed = (int) timer;
  93. }
  94.  
  95. short Random() {
  96.    RandSeed = (int)((RandSeed *25173 + 13849) % 65536);
  97.    return ( (short) RandSeed);
  98. }
  99.  
  100. int IntRand(int n) {
  101. /* Returns a random integer from 1 to n */
  102. float calculate;
  103.  
  104.    calculate = (float)(((float)Random()/32768.0 + 1.0) * ((float)n) / 2.0 + 1.0);
  105.    return ((int) calculate);
  106. }
  107.  
  108. ////////////////////////////////////////////////////////////////////////////
  109.  
  110. void ClrScr(void) {
  111.    od_clr_scr();
  112.    if (od_control.user_rip) {
  113.       od_printf ("\n\r");
  114.    } 
  115. }
  116.  
  117. void More (void) {
  118.    od_printf ("`blue`[`bright blue` More... `blue`]");
  119.    od_get_key (TRUE);
  120.    od_printf ("\n\r`white`");
  121. }
  122.  
  123. void Intro (void) {
  124.    int temp = od_control.user_screen_length;
  125.    od_control.user_screen_length = 50;
  126.    od_send_file ("BMINTRO");
  127.    od_control.user_screen_length = temp;
  128.    More();
  129.    ClrScr();
  130.    od_printf("`bright blue`\n\r The Blue Moon Tavern `bright white`%s\n\r", VERSION);
  131.    od_printf("`green` (C) Copyright 1996 `bright magenta`AQUARIUS `magenta`Software\n\r");
  132.    od_printf("`blue` Written 1/6/96 `bright blue`By Dan Shaurette\n\r\n\r");
  133.    od_set_colour (L_WHITE,D_BLACK);
  134. }
  135.  
  136. void ThatsAll (void) {
  137.    od_printf ("\n\r\n\r`bright blue`For Support Call `magenta`The Mostly Harmless BBS");
  138.    od_printf ("`blue` -=- `cyan`(602) `bright cyan`395-0472\n\r\n\r");
  139.    od_printf ("`bright blue`Press Any Key to Return to `bright red`GOTHIK`gray`...\n\r");
  140.    od_get_key (TRUE);
  141.    od_exit (0, FALSE);
  142. }
  143.  
  144. /////////////////////////////////////////////////////////////////////////////
  145.  
  146. void sleep (int seconds) {
  147. // Will sleep for specified seconds, but keep the kernel active.
  148.    long until = (*(long far*)0x46cL)+(18L*(long)seconds);
  149.    while (until>*(long far*)0x46cL) {
  150.       od_kernel();
  151.    }
  152. }
  153.  
  154. int RIPdetect (void) {
  155. char ch;
  156.  
  157.    od_printf ("Attempting to detect RIP graphics...\n\r");
  158.  
  159.    if (od_control.user_rip) {      // First, was it set by a drop file?
  160.       od_control.user_ansi=TRUE;
  161.       od_printf ("RIP detected!\n\r");
  162.       return (TRUE);
  163.    }
  164.    
  165.    od_autodetect(DETECT_NORMAL);   // Can od_autodetect() tell?
  166.    if (od_control.user_rip) {
  167.       od_control.user_ansi=TRUE;
  168.       od_printf ("RIP detected!\n\r");
  169.       return (TRUE);
  170.    }                                                                
  171.  
  172.    od_clear_keybuffer();
  173.    od_disp_emu ("\x1b[!", TRUE);       /* \x1b sends the hex code for ESC */
  174.    sleep(2);
  175.    ch = od_get_key(FALSE);
  176.    if ((ch == 'R')||(ch == 'I')||(ch == 'P')||(ch == 'S')||(ch == 'C')) {
  177.       od_printf("!|*\n\r");      
  178.       od_printf("!|*\n\r");      
  179.       ClrScr();
  180.       od_control.user_rip=TRUE;
  181.       od_control.user_ansi=TRUE;
  182.       od_printf ("RIP detected!\n\r");
  183.       od_clear_keybuffer();
  184.       return (TRUE);
  185.    }   
  186.    od_printf ("Attempting to detect ANSI...\n\r");
  187.    od_clear_keybuffer();
  188.    od_disp_emu ("\x1b[6n", TRUE);       /* \x1b sends the hex code for ESC */
  189.    sleep(2);
  190.    ch = od_get_key(FALSE);
  191.    if ((ch == '\x1b')||(ch == '[')||(ch == 'n')||(ch == ';')||(ch == 'R')) {
  192.       ClrScr();
  193.       od_control.user_rip=FALSE;
  194.       od_control.user_ansi=TRUE;
  195.       od_printf ("`bright white`ANSI detected!\n\r");
  196.       od_clear_keybuffer();
  197.       return (FALSE);
  198.    } else {
  199.       od_control.user_rip=FALSE;
  200.       od_control.user_ansi=FALSE;
  201.       od_printf ("ASCII accepted\n\r");
  202.       return (FALSE);
  203.    }   
  204. }
  205.  
  206. int Check (void) {
  207. char Snd[80], Rec[80];
  208.    sprintf (Snd, "!|1F010000bar1.icn\r");
  209.    od_printf (Snd);
  210.    od_input_str (Rec,79,'.',':');
  211.    if (_stricmp(Rec, "1")==0) {
  212.       return (TRUE);
  213.    } else {
  214.       return (FALSE);
  215.    }
  216. }
  217.  
  218. void Download1by1 (void) {
  219.    od_printf("!|*\n\r");
  220.    ClrScr();
  221.    od_printf ("\n\r`bright white`You need the icon files necessary to properly view the intro screen.\n\r");
  222.    od_printf ("If you choose to download them now, they will be sent to your term's icon\n\r");
  223.    od_printf ("directory.  If you choose not to download them at this time, the game will end.\n\r\n\r");
  224.    od_printf ("`gray`Do you wish to continue? `bright white`(Y/n) ");
  225.    if ( (od_get_answer ("YN\n\r")) == 'N') {
  226.       od_printf ("N\n\r\n\r");
  227.       ThatsAll();
  228.    }
  229.    od_printf ("Y`gray`\n\r\n\r");
  230.    od_printf ("!|9%c07020000bar1.icn<>\n\r", 27);
  231.    sprintf (command, "dsz port %d sz bar1.icn", od_control.port+1);
  232.    od_spawn(command);
  233.    od_printf ("!|9%c07020000bar2.icn<>\n\r", 27);
  234.    sprintf (command, "dsz port %d sz bar2.icn", od_control.port+1);
  235.    od_spawn(command);
  236.    More();
  237. }
  238.  
  239. void RIPfileQuery(void) {
  240.    od_printf("!|*\n\r");
  241.    ClrScr();
  242.    if (!Check())
  243.       Download1by1();
  244. }
  245.  
  246. /////////////////////////////////////////////////////////////////////////////
  247.  
  248. void custom_line_function (char *keyword, char *options) {
  249.    if (strcmp(keyword, "GOTHIKDIR")==0) {
  250.       strcpy(GothikDir, options);
  251.    }
  252. }
  253.  
  254. void before_chat_function (void) {
  255.    before_chat_saved = od_save_screen(before_chat_buffer);
  256.    ClrScr();
  257. }
  258.  
  259. void after_chat_function (void) {
  260.    if (before_chat_saved) {
  261.       od_restore_screen(before_chat_buffer);
  262.    }
  263. }
  264.  
  265. /////////////////////////////////////////////////////////////////////////////
  266.  
  267. void far GetPlayerNum (void) {
  268. FILE *InPlayFile;
  269. char Path[100];
  270.    sprintf (Path, "%sINPLAY.DAT", GothikDir);   
  271.    if ( ( InPlayFile = fopen ( Path, "rb" ) ) == NULL ) {
  272.       od_printf ("`white`InPlay.Dat File Not Found!\n\r");
  273.       ThatsAll();
  274.    } else {
  275.       fscanf (InPlayFile, "%d", &playerNum);
  276.       fclose (PlayerFile);
  277.    }
  278. }
  279.  
  280. void far LoadData (void) {
  281. char Path[100];
  282.    sprintf (Path, "%sGOTHIK.PLR", GothikDir);
  283.    if ( ( PlayerFile = fopen ( Path, "rb" ) ) == NULL ) {
  284.       od_printf ("`white`Player Data File Not Found!\n\r");
  285.       ThatsAll();
  286.    } else {
  287.       fseek (PlayerFile, ((long)(playerNum*sizeof(struct PlayerData))), SEEK_SET);
  288.       fread (&Player, sizeof (struct PlayerData), 1, PlayerFile);
  289.       fclose (PlayerFile);
  290.    }
  291. }
  292.  
  293. void far SaveData (void) {
  294. char Path[100];
  295.    sprintf (Path, "%sGOTHIK.PLR", GothikDir);
  296.    if ( ( PlayerFile = fopen ( Path, "r+b" ) ) == NULL ) {
  297.       od_printf ("`white`Player Data File Not Found!\n\r");
  298.       ThatsAll();
  299.    } else {
  300.       fseek (PlayerFile, ((long)(playerNum*sizeof(struct PlayerData))), SEEK_SET);
  301.       fwrite (&Player , sizeof (struct PlayerData), 1, PlayerFile);
  302.       fclose (PlayerFile);
  303.    }
  304. }
  305.  
  306. void far LoadConvo (void) {
  307. FILE *ConvoFile;
  308.    ConvoCount=0;
  309.    if ( ( ConvoFile = fopen ( "CONVO.TXT", "r" ) ) == NULL ) {
  310.       od_printf ("`white`You can make out some mumbling, but there is no conversation yet.\n\r");
  311.    } else {
  312.       fgets (Convo[ConvoCount], 79, ConvoFile);
  313.       while (!feof(ConvoFile)) {
  314.          od_printf ("`bright cyan`%s\r", Convo[ConvoCount++]);
  315.          fgets (Convo[ConvoCount], 79, ConvoFile);
  316.          od_printf ("`bright white`%s\r", Convo[ConvoCount++]);
  317.          fgets (Convo[ConvoCount], 79, ConvoFile);
  318.       }
  319.    }
  320.    fclose (ConvoFile);
  321. }
  322.  
  323. void far SaveConvo (void) {
  324. FILE *ConvoFile;
  325. int i=0;
  326.    if ( ( ConvoFile = fopen ( "CONVO.TXT", "w" ) ) == NULL ) {
  327.       od_printf ("`white`Error opening CONVO.TXT!\n\r");
  328.       ThatsAll();
  329.    }
  330.    if (ConvoCount>20) {
  331.       i = 2;
  332.    }
  333.    while (i < ConvoCount) {
  334.       fputs (Convo[i++], ConvoFile);
  335.    }
  336.    fclose (ConvoFile);
  337. }
  338.  
  339. ////////////////////////////////////////////////////////////////////////////
  340.  
  341. void far Donovan (void) {
  342. char op;
  343. long cost=0L;
  344. int effect;
  345. static int PGGB=0;
  346.    ClrScr();
  347.    od_printf ("`gray`   You make your way to a barstool.  Donovan walks over to you and you begin\n\r");
  348.    od_printf ("to chat.  He eventually mentions that he's been experimenting with making\n\r");
  349.    od_printf ("Pan Galactic Gargle Blasters again.  Each batch he makes never has the same\n\r");
  350.    od_printf ("effect, and everyone seems to have a different reaction.  Some good, some bad.\n\r");
  351.    od_printf ("And no matter what happens, you should never EVER drink more than two per day!\n\r\n\r");
  352.    cost = (long)((Player.level*10)+(IntRand(10)-1));
  353.    od_printf ("   He leans close and says, `bright white`\"I'll let ya try a glass for, say, $%ld.\"`gray`\n\r\n\r", cost);
  354.    od_printf ("`bright cyan`You have `bright white`$%ld`bright cyan`.  Do you want to buy a glass?`gray` ", Player.onHand);
  355.    op = od_get_answer("YN");
  356.    if (op == 'Y') {
  357.       if (Player.onHand-cost < 0) {
  358.          od_printf ("\n\r\n\r`yellow`Sorry, but you can't afford that.\n\r");
  359.          More();
  360.       } else {
  361.          if (PGGB < 2) {
  362.             Player.onHand -= cost;
  363.             PGGB++;
  364.             switch (IntRand(7)) {
  365.                case 1: Player.HP = Player.maxHP;
  366.                        od_printf ("\n\r`bright white`Positive Effect!\n\r");
  367.                        od_printf ("You have had all of your Hit Points restored!\n\r\n\r`gray`");
  368.                        break;
  369.                case 2: effect = IntRand(10)*10;
  370.                        Player.HP = (int)(((float)Player.HP)*((float)effect/100.0));
  371.                        od_printf ("\n\r`bright red`Negative Effect!\n\r`brite white`");
  372.                        od_printf ("You now have only %d%% of your previous Hit Points,\n\r", effect);
  373.                        od_printf ("bringing you down to %d HP!\n\r\n\r`gray`", Player.HP);
  374.                        break;
  375.                case 3: effect = IntRand(10);
  376.                        Player.maxHP += effect;
  377.                        od_printf ("\n\r`bright white`Positive Effect!\n\r");
  378.                        od_printf ("Your maximum HP have been increased by %d!\n\r\n\r`gray`", effect);
  379.                        break;
  380.                case 4: effect = IntRand(5);
  381.                        Player.moves += effect;
  382.                        od_printf ("\n\r`bright white`Positive Effect!\n\r");
  383.                        od_printf ("Your number of moves today have increased by %d!\n\r\n\r`gray`", effect);
  384.                        break;
  385.                case 5: effect = IntRand(5);
  386.                        if (Player.moves <= 5) {
  387.                           effect == 0;
  388.                        }
  389.                        Player.moves -= effect;
  390.                        od_printf ("\n\r`bright red`Negative Effect!\n\r");
  391.                        od_printf ("Your number of moves today have decreased by %d!\n\r\n\r`gray`", effect);
  392.                        break;
  393.                case 6: effect = IntRand(10)*IntRand(10)*IntRand(10);
  394.                        Player.exp += effect;
  395.                        od_printf ("\n\r`bright white`Positive Effect!\n\r");
  396.                        od_printf ("You have gained %d experience!\n\r\n\r`gray`", effect);
  397.                        break;
  398.                case 7: effect = IntRand(10)*IntRand(10);
  399.                        Player.exp -= effect;
  400.                        od_printf ("\n\r`bright red`Negative Effect!\n\r");
  401.                        od_printf ("You have lost %d experience!\n\r\n\r`gray`", effect);
  402.             }
  403.             More();
  404.          } else {
  405.             od_printf ("\n\r\n\r`bright white`\"I wouldn't have another one of those right now, if I were you.\"`gray`\n\r\n\r");
  406.             More();
  407.          }
  408.       }
  409.    } else {
  410.       od_printf ("\n\r\n\r`gray`Don gets a sad, disappointed look and says, `bright white`\"Maybe later, eh?\"`gray`\n\r\n\r");
  411.       More();
  412.    }
  413.    SaveData();
  414. }
  415.  
  416. void far Lilith (void) {
  417. char op;
  418. long cost=0L;
  419.    ClrScr();
  420.    od_printf ("`gray`   You decide to sit down at a table and enjoy a drink.\n\r");
  421.    od_printf ("The beautiful red-headed waitress, Lilith, walks up to you and asks what you\n\r");
  422.    od_printf ("would like to drink.\n\r");
  423.    if (Player.mortal == 0) { // Human
  424.       od_printf ("\n\r   1) Mixed Drink     $1\n\r");
  425.       od_printf ("   2) Beer from Tap   $2\n\r");
  426.       od_printf ("   3) Bottle of Beer  $2\n\r");
  427.       od_printf ("   4) Glass of Wine   $3\n\r");
  428.       od_printf ("   0) None of the above\n\r\n\r");
  429.       od_printf ("`bright cyan`You have `bright white`$%ld`bright cyan`.  What do you want to buy? ", Player.onHand);
  430.       op = od_get_answer("01234");
  431.       if (op!='0') {
  432.          switch (op) {
  433.             case '1': cost=1L; break;
  434.             case '2': cost=2L; break;
  435.             case '3': cost=2L; break;
  436.             case '4': cost=3L;
  437.          }
  438.          if (Player.onHand-cost < 0) {
  439.             od_printf ("\n\r\n\r`yellow`Sorry, but you can't afford that.\n\r");
  440.             More();
  441.          } else {
  442.             Player.onHand -= cost;
  443.             od_printf ("\n\r\n\r`grey`   That hit the spot!  ::urp::\n\r");
  444.             More();
  445.          }
  446.       }
  447.    } else { /////////////////// Vamp
  448.       od_printf ("   She knows that you are a vampire, like she is, so she offers some\n\r");
  449.       od_printf ("beverages that can disguise what it is you truly Thirst for.\n\r\n\r");
  450.       od_printf ("   1) Bloody Mary     $1\n\r");
  451.       od_printf ("   2) Red Lager       $2\n\r");
  452.       od_printf ("   3) Red Wine        $3\n\r");
  453.       od_printf ("   0) None of the above\n\r\n\r");
  454.       od_printf ("`bright cyan`You have `bright white`$%ld`bright cyan`.  What do you want to buy? ", Player.onHand);
  455.       op = od_get_answer("0123");
  456.       if (op!='0') {
  457.          switch (op) {
  458.             case '1': cost=1L; break;
  459.             case '2': cost=2L; break;
  460.             case '3': cost=3L;
  461.          }
  462.          if (Player.onHand-cost < 0) {
  463.             od_printf ("\n\r\n\r`yellow`Sorry, but you can't afford that.\n\r");
  464.             More();
  465.          } else {
  466.             Player.onHand -= cost;
  467.             Player.Thirst--;
  468.             if (Player.Thirst<0) {
  469.                Player.Thirst=0;
  470.             }
  471.             od_printf ("\n\r\n\r`grey`   That hit the spot!  ::urp::\n\r");
  472.             More();
  473.          }
  474.       }
  475.    }
  476.    SaveData();
  477. }
  478.  
  479. void far Converse (void) {
  480. char string[80];
  481. char op;
  482.  
  483.    ClrScr();
  484.    od_printf ("`bright white`");
  485.    LoadConvo();
  486.    od_printf ("\n\r`bright yellow`Add to this conversation? `gray`");
  487.    op = od_get_answer("YN");
  488.    od_printf ("%c\n\r", op);
  489.    
  490.    if (op=='Y') {
  491.       od_printf ("`bright cyan`Begin typing... you have 77 letters maximum!\n\r> `bright white`");
  492.       od_input_str(string,77,32,127);
  493.       sprintf (Convo[ConvoCount++], "%s said:\n", Player.gameName);
  494.       sprintf (Convo[ConvoCount++], "%s\n", string);
  495.       SaveConvo();
  496.    }
  497.    More();
  498. }
  499.  
  500. void far Bar (void) {
  501. char op;
  502. int done=FALSE;
  503.  
  504.    od_printf ("`gray`   You walk down the street to a little bar with a blue neon sign that reads\n\r");
  505.    od_printf ("`bright blue`The Blue Moon Tavern`gray`.  It seems inviting enough, but you really just want to\n\r");
  506.    od_printf ("get out of the rain.  As you walk in, you are hailed by the regulars who\n\r");
  507.    od_printf ("recognize you immediately.");
  508.    while (!done) {
  509.       od_printf ("\n\r\n\r`cyan`T)alk to Donovan, the Bartender\n\r");
  510.       od_printf ("S)it down and order from Lilith, the Waitress\n\r");
  511.       od_printf ("C)onverse with the regulars\n\r");
  512.       od_printf ("L)eave the bar\n\r\n\r");
  513.       od_printf ("`bright cyan`What do you want to do?`gray` ");
  514.       op = od_get_answer("TSCL");
  515.       od_printf ("%c\n\r", op);
  516.       switch (op) {
  517.          case 'T': // Order PGGB from Donovan
  518.                    Donovan();
  519.                    break;
  520.          case 'S': // Order from Lilith
  521.                    Lilith();
  522.                    break;
  523.          case 'C': // Converse with Patrons
  524.                    Converse();
  525.                    break;
  526.          default:  done=TRUE;
  527.       }
  528.       ClrScr();
  529.    }
  530. }
  531.  
  532. /////////////////////////////////////////////////////////////////////////////
  533.  
  534. void main (int argc, char *argv[]) {
  535.    sprintf (od_control.od_prog_name, "Blue Moon Bar");
  536.    od_control.od_config_file = INCLUDE_CONFIG_FILE;
  537.    od_control.od_config_filename = "BLUEMOON.CFG";
  538.    od_control.od_config_function = custom_line_function;
  539.    od_control.od_cbefore_chat = before_chat_function;   
  540.    od_control.od_cafter_chat = after_chat_function;   
  541.    od_control.od_default_rip_win = TRUE;
  542.    od_init();
  543.    od_control.od_help_text2=(char *)"     The Blue Moon Tavern v.1.0   -=+*+=-  (C)opyright 1995 AQUARIUS Software ";
  544.  
  545.    od_printf("!|*\n\r");
  546.    ClrScr();
  547.    if (od_control.baud == 0) {
  548.       od_control.user_rip=FALSE;
  549.       od_control.user_ansi=TRUE;
  550.       od_printf ("`bright white`Local mode detected... defaulting to ANSI\n\r");
  551.       sleep(1);
  552.    } else {
  553.       if (RIPdetect()) {
  554.          RIPfileQuery();
  555.       }
  556.    }
  557.    Intro();
  558.    Randomize();
  559.    GetPlayerNum();
  560.    LoadData();
  561.    Bar();
  562.    ThatsAll();
  563. }
  564.